
/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

高可用组
高可用组相关接口

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

#import <Foundation/Foundation.h>

#import <JDCloudOCSDKAg/AgExecutor.h>


/// 修改一个高可用组的信息
@implementation  AgUpdateAgExecutor

-(id) initWithJDCloudClient:(AgClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"PATCH";
    self.url = @"/regions/{regionId}/availabilityGroups/{agId}";
    return self;
}
@end

/// 根据 id 删除高可用组，需确保 AG 中云主机实例已全部删除
@implementation  AgDeleteAgExecutor

-(id) initWithJDCloudClient:(AgClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"DELETE";
    self.url = @"/regions/{regionId}/availabilityGroups/{agId}";
    return self;
}
@end

/// 修改高可用组的实例模板
@implementation  AgSetInstanceTemplateExecutor

-(id) initWithJDCloudClient:(AgClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"POST";
    self.url = @"/regions/{regionId}/availabilityGroups/{agId}:setInstanceTemplate";
    return self;
}
@end

/// 查询(ag)配额
@implementation  AgDescribeQuotasExecutor

-(id) initWithJDCloudClient:(AgClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/regions/{regionId}/quotas";
    return self;
}
@end

/// 从高可用组中剔除实例
@implementation  AgAbandonInstancesExecutor

-(id) initWithJDCloudClient:(AgClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"POST";
    self.url = @"/regions/{regionId}/availabilityGroups/{agId}:abandonInstances";
    return self;
}
@end

/// 创建一个高可用组
@implementation  AgCreateAgExecutor

-(id) initWithJDCloudClient:(AgClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"POST";
    self.url = @"/regions/{regionId}/availabilityGroups";
    return self;
}
@end

/// 根据 id 查询高可用组详情
@implementation  AgDescribeAgExecutor

-(id) initWithJDCloudClient:(AgClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/regions/{regionId}/availabilityGroups/{agId}";
    return self;
}
@end

/// 使用过滤条件查询一个或多个高可用组
@implementation  AgDescribeAgsExecutor

-(id) initWithJDCloudClient:(AgClient*)JDCloudClient
{
    self.jdCloudClient = JDCloudClient;
    self.method = @"GET";
    self.url = @"/regions/{regionId}/availabilityGroups";
    return self;
}
@end
